<html>
<head><meta charset="utf-8"><title>traits, crate dependencies, and nerd sniping · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/traits.2C.20crate.20dependencies.2C.20and.20nerd.20sniping.html">traits, crate dependencies, and nerd sniping</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="200743769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/traits%2C%20crate%20dependencies%2C%20and%20nerd%20sniping/near/200743769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/traits.2C.20crate.20dependencies.2C.20and.20nerd.20sniping.html#200743769">(Jun 13 2020 at 01:59)</a>:</h4>
<p>The <a href="https://news.ycombinator.com/item?id=23501474">recent post of implementing Forth in the trait system</a> made me wonder: could we implement a crate dependency resolution algorithm based on Chalk?</p>



<a name="200744644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/traits%2C%20crate%20dependencies%2C%20and%20nerd%20sniping/near/200744644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/traits.2C.20crate.20dependencies.2C.20and.20nerd.20sniping.html#200744644">(Jun 13 2020 at 02:23)</a>:</h4>
<p>What did you have in mind? I'm not quite seeing the connection</p>



<a name="200745060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/traits%2C%20crate%20dependencies%2C%20and%20nerd%20sniping/near/200745060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/traits.2C.20crate.20dependencies.2C.20and.20nerd.20sniping.html#200745060">(Jun 13 2020 at 02:34)</a>:</h4>
<p>Note that there's no real point here; this is idle musing.</p>



<a name="200745074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/traits%2C%20crate%20dependencies%2C%20and%20nerd%20sniping/near/200745074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/traits.2C.20crate.20dependencies.2C.20and.20nerd.20sniping.html#200745074">(Jun 13 2020 at 02:35)</a>:</h4>
<p>Just that dependency resolution is a "solve these things within these constraints". I'm curious how close, conceptually, trait solving is to that.</p>



<a name="200746350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/traits%2C%20crate%20dependencies%2C%20and%20nerd%20sniping/near/200746350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/traits.2C.20crate.20dependencies.2C.20and.20nerd.20sniping.html#200746350">(Jun 13 2020 at 03:14)</a>:</h4>
<p>I'm really not sure</p>



<a name="200756662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/traits%2C%20crate%20dependencies%2C%20and%20nerd%20sniping/near/200756662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Ross <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/traits.2C.20crate.20dependencies.2C.20and.20nerd.20sniping.html#200756662">(Jun 13 2020 at 08:59)</a>:</h4>
<p>I'd imagine the fact of version numbers being an ordered set of numbers makes it a relatively different problem domain?</p>
<p>Chalk seems to deal largely with unordered thing and complete rejects ambiguous results. On the other hand, dependency resolution deals with ordered versions and usually has to pick the best option via a min/max, very rarely getting a fully unambiguous result.</p>
<p>Maybe it'd be possible to model that in chalk? But I doubt it'd be at all useful compared to just making a separate engine with the different domain constraints in mind...</p>



<a name="200760234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/traits%2C%20crate%20dependencies%2C%20and%20nerd%20sniping/near/200760234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/traits.2C.20crate.20dependencies.2C.20and.20nerd.20sniping.html#200760234">(Jun 13 2020 at 10:41)</a>:</h4>
<p>I don't think chalk's solver is really geared to that, in part for the reasons <span class="user-mention" data-user-id="218710">@David Ross</span> mentioned, but also because we're increasingly tuning the engine to the needs of <em>trait solving</em> (e.g., with things like non-enumerable, builtin rules, even the setup of the recursive solver vs SLG solver)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>